package com.youuvs.enums;

public enum GlobalEnumCode {

    //成功
    OK("成功","0"),
    //异常
    ERROR("服务暂不可用,请稍后重试","-1"),
    //system异常

    //common异常,以100xx开头
    PARAM_iS_NULL_ERROR("参数不能为空","10001"),
    PHONE_FORMART_ERROR("手机号格式错误","100002"),
    INTERVAL_ERROR("请在一分钟后再次请求","10003"),
    CODE_EXPIRED_ERROR("验证码无效","10004"),
    CODE_INCORRECT_ERROR("验证码不正确","10005"),
    //user异常
    USER_EXIST_ERROR("此手机号已被注册","20001"),
    USER_REGISTER_ERROR("注册失败","20002"),
    USER_BALANCE_ERROR("余额不足,无法购买","20003"),
    USER_TICKET_ERROR("您没有购买此票","20004"),
    USER_USED_ERROR("此票已被使用","20005"),
    USER_OVERDUE_ERROR("此票已过期","20006"),


    //uaa异常


    ;

    private String message;
    private String code;

    GlobalEnumCode(String message, String code) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }
}
